#include <bits/stdc++.h>
using namespace std;

const int N = 2e5+5;

typedef pair<int, int> P;
P s;
int n;
P a[N];

const int dx[8] = {-1, -1, -1, 0, 0, 1, 1, 1},
dy[8] = {1, 0, -1, 1, -1, 1, 0, -1};

bool check(const P &p) {
    return p.first >= 0 && p.second <= 1000000000 && p.first <= 1000000000 && p.second >= 0;
}

inline bool inbound(int a, int b, int t) {
    if (a > b) swap(a, b);
    return a <= t && t <= b;
}

inline bool in(P a, P b, P t) {
    return inbound(a.first, b.first, t.first) && inbound(a.second, b.second, t.second);
}

int tryit(const P &tx) {
    int ans = 0;
    for (int i=0; i<n; ++i) {
        if (in(s, a[i], tx)) ++ans;
    }
    return ans;
}

int main(int argc, char const *argv[])
{
    scanf("%d%d%d", &n, &s.first, &s.second);
    for (int i=0; i<n; ++i) {
        scanf("%d%d", &a[i].first, &a[i].second);
    }
    int ans = 0; P ansp;
    for (int i=0; i<8; ++i) {
        P tx(s.first + dx[i], s.second + dy[i]);
        if (!check(tx)) continue;
        int tans = tryit(tx);
        if (tans > ans) {
            ans = tans;
            ansp = tx;
        }
    }
    printf("%d\n", ans);
    printf("%d %d\n", ansp.first, ansp.second);
    return 0;
}
